1. Field of the Invention
This invention relates to a fail safe method and apparatus for a Universal Serial Bus ("USB") device, and more particularly to a method and apparatus for allowing a USB device to recover from a malfunction condition.
2. Discussion of Background
USB is a peripheral bus standard that allows computer peripherals to be attached to a personal computer without the need for specialized cards or other vendor specific hardware attachments. The USB standard specifies a common configuration for the connection of well known peripherals, such as CD-ROM, tape and floppy disk drives, scanners, printers, keyboards, joysticks, mice, telephones, modems, etc. to a USB host computer. In addition to well known peripheral devices, the USB standard has flexibility to accommodate less known and newly developed devices, such as plug-and-play devices which are automatically configured by the host computer when these devices are added. Information about the USB standard, including the USB specification v1.0, incorporated herein by reference, for building USB compliant devices, is currently available free of charge over the Internet.
However, a malfunction condition may occur in a USB device, such as a plug-and-play device, wherein the USB device after being configured by the host computer may malfunction and stop communicating with the host computer due to problems, such as transmission errors, USB protocol errors, bugs in the host operating system or device firmware, etc. For example, a host operating system may terminate the function of the USB device, which may be busy at the moment or fails to acknowledge incoming data packets more than three times, for not communicating with the host computer. The above situation is referred to as a "brown out" condition.
According to the USB specification v1.0, page 201, the host operating system is supposed to record the last error type without trying to re-establish communications with the non-communicating USB device. When this occurs, (1) the user may have to re-boot the USB device or physically disconnect and then re-connect the USB device to allow the host computer to recognize and then re-configure the USB device, or (2) the host computer operating system must be smart enough to avoid terminating the USB device when the USB device is terminally busy not communicating (e.g., continuously returning non-acknowledge (NAK) signals) and reset and re-configure the USB device. The first method defeats the whole purpose of plug-and-play technology, and the second method requires additional USB host computer operating system overhead to keep track of and recover from the USB device brown out condition.